using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Generalization
{
    /// <summary>
    /// <para>Expand</para>
    /// <para>Expands specified zones of a raster by a specified number of cells.</para>
    /// <para>将栅格的指定区域扩展为指定数量的像元。</para>
    /// </summary>    
    [DisplayName("Expand")]
    public class Expand : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Expand()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The input raster for which the identified zones are to be expanded</para>
        ///   <para>It must be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要展开其标识区域的输入栅格</para>
        ///   <para>它必须是整数类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output generalized raster.</para>
        ///   <para>The specified zones of the input raster will be expanded by the specified number of cells.</para>
        ///   <para>The output is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出广义栅格。</para>
        ///   <para>输入栅格的指定区域将按指定数量的像元展开。</para>
        ///   <para>输出始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_number_cells">
        /// <para>Number of cells</para>
        /// <para><xdoc>
        ///   <para>The number of cells to expand each specified zone by.</para>
        ///   <para>The value must be an integer greater than 1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要扩展每个指定区域的像元数。</para>
        ///   <para>该值必须是大于 1 的整数。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_zone_values">
        /// <para>Zone values</para>
        /// <para><xdoc>
        ///   <para>The list of zone values to expand.</para>
        ///   <para>The zone values must be integers. They can be in any order.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要展开的区域值列表。</para>
        ///   <para>区域值必须为整数。它们可以按任何顺序排列。</para>
        /// </xdoc></para>
        /// </param>
        public Expand(object _in_raster, object _out_raster, long? _number_cells, List<object> _zone_values)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
            this._number_cells = _number_cells;
            this._zone_values = _zone_values;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Expand";

        public override string CallName => "sa.Expand";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _number_cells, _zone_values, _expand_method.GetGPValue()];

        /// <summary>
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The input raster for which the identified zones are to be expanded</para>
        ///   <para>It must be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要展开其标识区域的输入栅格</para>
        ///   <para>它必须是整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output generalized raster.</para>
        ///   <para>The specified zones of the input raster will be expanded by the specified number of cells.</para>
        ///   <para>The output is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出广义栅格。</para>
        ///   <para>输入栅格的指定区域将按指定数量的像元展开。</para>
        ///   <para>输出始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Number of cells</para>
        /// <para><xdoc>
        ///   <para>The number of cells to expand each specified zone by.</para>
        ///   <para>The value must be an integer greater than 1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要扩展每个指定区域的像元数。</para>
        ///   <para>该值必须是大于 1 的整数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of cells")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _number_cells { get; set; }


        /// <summary>
        /// <para>Zone values</para>
        /// <para><xdoc>
        ///   <para>The list of zone values to expand.</para>
        ///   <para>The zone values must be integers. They can be in any order.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要展开的区域值列表。</para>
        ///   <para>区域值必须为整数。它们可以按任何顺序排列。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zone values")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _zone_values { get; set; }


        /// <summary>
        /// <para>Expand method</para>
        /// <para><xdoc>
        ///   <para>The method used to expand the selected zones.</para>
        ///   <bulletList>
        ///     <bullet_item>Morphological—Uses a mathematical morphology method to expand the zones. This is the default.</bullet_item><para/>
        ///     <bullet_item>Distance—Uses a distance-based method to expand the zones.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The Distance option supports parallelization, and can be controlled with the Parallel Processing Factor environment setting.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于展开所选区域的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>形态学 （Morphological） - 使用数学形态学方法展开区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>距离 - 使用基于距离的方法展开区域。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>“距离”选项支持并行化，并且可以通过“并行处理因子”环境设置进行控制。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expand method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _expand_method_value _expand_method { get; set; } = _expand_method_value._MORPHOLOGICAL;

        public enum _expand_method_value
        {
            /// <summary>
            /// <para>Morphological</para>
            /// <para>Morphological—Uses a mathematical morphology method to expand the zones. This is the default.</para>
            /// <para>形态学 （Morphological） - 使用数学形态学方法展开区域。这是默认设置。</para>
            /// </summary>
            [Description("Morphological")]
            [GPEnumValue("MORPHOLOGICAL")]
            _MORPHOLOGICAL,

            /// <summary>
            /// <para>Distance</para>
            /// <para>Distance—Uses a distance-based method to expand the zones.</para>
            /// <para>距离 - 使用基于距离的方法展开区域。</para>
            /// </summary>
            [Description("Distance")]
            [GPEnumValue("DISTANCE")]
            _DISTANCE,

        }

        public Expand SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}